class DivisionByZeroException extends RuntimeException {
    public DivisionByZeroException(String message) {
        super(message);
    }
}

class InvalidOperatorException extends Exception {
    public InvalidOperatorException(String message) {
        super(message);
    }
}

public class Task {
    static double calculate(char operator, int v1, int v2) {
        switch (operator) {
            case '+':
                return v1 + v2;
            case '-':
                return v1 - v2;
            case '*':
                return v1 * v2;
            case '/':
                return v1 * 1.0 / v2;
            default:
                return 0.0;
        }
    }

    public static void main(String[] args) {
        double result = calculate('/', 2, 0);
            System.out.println("Result:" + result);
    }

}